#pragma once
#include "UIElement.h"

namespace GUIToolkit
{
	class TextBoxWnd;

	class TextBox
		: public Control
	{
	private:
		friend class TextBoxWnd;

		TextBoxWnd* pWnd;
		bool readonly;

	protected:
		virtual void OnPropertyChanged(PROPERTY p);

	public:
		TextBox(float x, float y, float width, float height, LPWSTR text = NULL);

		virtual bool Focusable() const { return true; }

		bool IsReadOnly()
		{
			return readonly;
		}
		void SetReadOnly(bool value)
		{
			this->readonly = value;
		}

		~TextBox(void);
	};

}